package com.oa.modules.approvalsec1.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.oa.modules.approvalsec1.entity.UserSocialEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 *
 *
 * @author jiangwei
 * @email 785297226@qq.com
 * @date 2021-11-09 13:36:38
 */
@Mapper
public interface UserSocialDao extends BaseMapper<UserSocialEntity> {


    /**
     * 查询总条数
     *
     * @author jiangwei
     * @email 785297226@qq.com
     * @date 2021-11-09 13:36:38
     * @Description 查询分页数据
     */
    @Select("<script>SELECT COUNT( 1 ) FROM (" +
            "select t1.* from user_social t1 )" +
            " TOTAL</script>")
    long findPage(@Param("params") Map<String, Object> params);

    /**
     * 查询分页数据
     *
     * @author jiangwei
     * @email 785297226@qq.com
     * @date 2021-11-09 13:36:38
     * @Description 查询分页数据
     */
    @Select("<script>select t1.* from user_social t1</script> ")
    List<UserSocialEntity> findRecords(IPage<UserSocialEntity> page, @Param("params") Map<String, Object> params);

}
